import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

/* Layout */
import Layout from '@/layout'
import ParentView from '@/components/ParentView'
/* 
 * Note: sub-menu only appear when route children.length >= 1
 * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
 *
 * hidden: true                   if set true, item will not show in the sidebar(default is false)
 * alwaysShow: true               if set true, will always show the root menu
 *                                if not set alwaysShow, when item has more than one children route,
 *                                it will becomes nested mode, otherwise not show the root menu
 * redirect: noRedirect           if set noRedirect will no redirect in the breadcrumb
 * name:'router-name'             the name is used by <keep-alive> (must set!!!)
 * meta : {
    roles: ['admin','editor']    control the page roles (you can set multiple roles)
    title: 'title'               the name show in sidebar and breadcrumb (recommend set)
    icon: 'svg-name'/'el-icon-x' the icon show in the sidebar
    breadcrumb: false            if set false, the item will hidden in breadcrumb(default is true)
    activeMenu: '/example/list'  if set path, the sidebar will highlight the path you set
  }
*/

export const constantRoutes = [
  {
    path: '/login',
    component: () => import('@/components/Login/index'),
    hidden: true,
    meta: {
      disabled: false
    }
  },
  {
    path: '/',
    component: Layout,
    redirect: '/instrument',
    name: '主页',
    meta: { title: '主页', icon: 'el-icon-star-on', affix: true, disabled: false },
    children: [
      {
        path: '/instrument',
        name: '仪表盘',
        component: () => import('@/components/Homepage/index'),
        meta: { title: '仪表盘', icon: 'el-icon-s-help',affix: true, disabled: false,}
      },
      {
        path: '/overviewOperational',
        name: '运营数据总览',
        component: () => import('@/views/instrumentManage/overviewOperational'),
        meta: { title: '运营数据总览', icon: 'el-icon-help', disabled: false, control: true  }
      },
      {
        path: '/linePopulation',
        name: '总人数折线图',
        component: () => import('@/views/instrumentManage/linePopulation'),
        meta: { title: '总人数折线图', icon: 'el-icon-female', disabled: false, control: true }
      }
    ]
  },
  {
    path: '/operationalStatistics',
    component: Layout,
    redirect: '/gameReport',
    name: '运营统计',
    meta: { title: '运营统计', icon: 'el-icon-c-scale-to-original', disabled: false, control: true },
    children: [
      {
        path: '/gameReport',
        name: '游戏报表',
        component: () => import('@/views/statisticsManage/generalBriefing/gameReport'),
        meta: { title: '游戏报表', icon: 'el-icon-mouse', disabled: false, control: true }
      },
      {
        path: '/terminalReport',
        name: '终端报表',
        component: () => import('@/views/statisticsManage/generalBriefing/terminalReport'),
        meta: { title: '终端报表', icon: 'el-icon-s-grid', disabled: false, control: true }
      },
      {
        path: '/gameAnalysis',
        name: '牌局分析',
        component: ParentView,
        meta: { title: '牌局分析', icon: 'el-icon-c-scale-to-original', disabled: false, control: true },
        children: [
          {
            path: '/cardStatistics',
            name: '牌型统计',
            component: () => import('@/views/statisticsManage/generalBriefing/gameAnalysis/cardStatistics'),
            meta: { title: '牌型统计', icon: 'el-icon-c-scale-to-original', disabled: false, control: true }
          },
          {
            path: '/patternDetails',
            name: '牌型详情',
            component: () => import('@/views/statisticsManage/generalBriefing/gameAnalysis/patternDetails'),
            meta: { title: '牌型详情', icon: 'el-icon-c-scale-to-original', disabled: false, control: true }
          },
          {
            path: '/winRate',
            name: '牌型胜率',
            component: () => import('@/views/statisticsManage/generalBriefing/gameAnalysis/winRate'),
            meta: { title: '牌型胜率', icon: 'el-icon-c-scale-to-original', disabled: false, control: true }
          },
          {
            path: '/leopard',
            name: 'A豹统计',
            component: () => import('@/views/statisticsManage/generalBriefing/gameAnalysis/leopard'),
            meta: { title: 'A豹统计', icon: 'el-icon-c-scale-to-original', disabled: false, control: true }
          },
        ]
      },
      {
        path: '/slotCollect',
        name: 'SLOT分析',
        component: ParentView,
        meta: { title: 'SLOT分析', icon: 'el-icon-c-scale-to-original', disabled: false, control: true },
        children: [
          {
            path: '/slotStatistics',
            name: 'SLOT统计',
            component: () => import('@/views/statisticsManage/generalBriefing/slotCollect/slotStatistics'),
            meta: { title: 'SLOT统计', icon: 'el-icon-wallet', disabled: false, control: true }
          },
          {
            path: '/slotDetails',
            name: 'SLOT详情',
            component: () => import('@/views/statisticsManage/generalBriefing/slotCollect/slotDetails'),
            meta: { title: 'SLOT详情', icon: 'el-icon-wallet', disabled: false, control: true }
          },
        ]
      },
      {
        path: '/fluvialAnalysis',
        name: '流水分析',
        component: () => import('@/views/statisticsManage/generalBriefing/fluvialAnalysis'),
        meta: { title: '流水分析', icon: 'el-icon-data-line', disabled: false, control: true }
      },
      {
        path: '/noviceAnalysis',
        name: '新手分析',
        component: () => import('@/views/statisticsManage/generalBriefing/noviceAnalysis'),
        meta: { title: '新手分析', icon: 'el-icon-data-analysis', disabled: false, control: true }
      },
      {
        path: '/registerReport',
        name: '注册报表',
        component: () => import('@/views/statisticsManage/generalBriefing/registerReport'),
        meta: { title: '注册报表', icon: 'el-icon-user', disabled: false, control: true }
      },
      {
        path: '/kolReport',
        name: 'KOL报表',
        component: () => import('@/views/statisticsManage/generalBriefing/kolReport'),
        meta: { title: 'KOL报表', icon: 'el-icon-document-copy', disabled: false, control: true }
      },
      {
        path: '/vipReport',
        name: 'VIP统计',
        component: () => import('@/views/statisticsManage/generalBriefing/vipReport'),
        meta: { title: 'VIP统计', icon: 'el-icon-c-scale-to-original', disabled: false, control: true }
      },
      {
        path: '/channelData',
        name: '通道数据',
        component: ParentView,
        meta: { title: '通道数据', icon: 'el-icon-c-scale-to-original', disabled: false, control: true },
        children: [
          {
            path: '/channelReport',
            name: '当日数据',
            component: () => import('@/views/statisticsManage/generalBriefing/channelData/channelReport'),
            meta: { title: '当日数据', icon: 'el-icon-c-scale-to-original', disabled: false, control: true }
          },
          {
            path: '/fourCharge',
            name: '多次复充统计',
            component: () => import('@/views/statisticsManage/generalBriefing/channelData/fourCharge'),
            meta: { title: '多次复充统计', icon: 'el-icon-c-scale-to-original', disabled: false, control: true }
          },
        ]
      },
      {
        path: '/remain',
        name: '留存数据',
        component: ParentView,
        meta: { title: '留存数据', icon: 'el-icon-receiving', disabled: false, control: true },
        children: [
          {
            path: '/rechargeRetain',
            name: '首充留存',
            component: () => import('@/views/statisticsManage/remain/rechargeRetain'),
            meta: { title: '首充留存', icon: 'el-icon-attract', disabled: false, control: true }
          },
          {
            path: '/loginRemain',
            name: '登录留存',
            component: () => import('@/views/statisticsManage/remain/loginRemain'),
            meta: { title: '登录留存', icon: 'el-icon-mobile', disabled: false, control: true }
          },
          {
            path: '/payRemain',
            name: '注册用户付费留存',
            component: () => import('@/views/statisticsManage/remain/payRemain'),
            meta: { title: '注册用户付费留存', icon: 'el-icon-bank-card', disabled: false, control: true }
          },
          {
            path: '/runOff',
            name: '3日流失数据',
            component: () => import('@/views/statisticsManage/remain/runOff'),
            meta: { title: '3日流失数据', icon: 'el-icon-switch-button', disabled: false, control: true }
          }
        ]
      },
      {
        path: '/ranking',
        name: '前十排名',
        component: ParentView,
        meta: { title: '前十排名', icon: 'el-icon-s-check', disabled: false, control: true },
        children: [
          {
            path: '/rechargeRanking',
            name: '充值排行',
            component: () => import('@/views/statisticsManage/ranking/ranking'),
            meta: { title: '充值排行', icon: 'el-icon-c-scale-to-original',type:1, disabled: false, control: true }
          },
          {
            path: '/profitRanking',
            name: '盈利排行',
            component: () => import('@/views/statisticsManage/ranking/ranking'),
            meta: { title: '盈利排行', icon: 'el-icon-c-scale-to-original',type:2, disabled: false, control: true }
          },
          {
            path: '/commissionRanking',
            name: '佣金排行',
            component: () => import('@/views/statisticsManage/ranking/ranking'),
            meta: { title: '佣金排行', icon: 'el-icon-c-scale-to-original',type:3, disabled: false, control: true }
          },
          {
            path: '/bettingRanking',
            name: '投注排名',
            component: () => import('@/views/statisticsManage/ranking/ranking'),
            meta: { title: '投注排名', icon: 'el-icon-c-scale-to-original',type:4, disabled: false, control: true }
          }
        ]
      },
      {
        path: '/online',
        name: '实时在线',
        component: () => import('@/views/statisticsManage/online/dailyOnline'),
        meta: { title: '实时在线', icon: 'el-icon-share', disabled: false, control: true },
      },
      {
        path: '/pointStatistics',
        name: '埋点统计',
        component: () => import('@/views/statisticsManage/generalBriefing/pointStatistics'),
        meta: { title: '埋点统计', icon: 'el-icon-film', disabled: false, control: true }
      },
    ]
  },
  {
    path: '/agentSystem',
    component: Layout,
    redirect: '/agent',
    name: '代理系统',
    meta: { title: '代理系统', icon: 'el-icon-s-check', disabled: false, control: true },
    children: [
      {
        path: '/agent',
        name: '代理查询',
        component: () => import('@/views/agentSystem/agent'),
        meta: { title: '代理查询', icon: 'el-icon-phone-outline', disabled: false, control: true }
      },
      {
        path: '/agent123',
        name: '用户代理123充',
        component: () => import('@/views/agentSystem/agent123'),
        meta: { title: '用户代理123充', icon: 'el-icon-receiving', disabled: false, control: true }
      },
      {
        path: '/downgrade',
        name: '代理降级',
        component: () => import('@/views/agentSystem/downgrade'),
        meta: { title: '代理降级', icon: 'el-icon-phone-outline', disabled: false, control: true }
      },
    ]
  },
  {
    path: '/riskControl',
    component: Layout,
    redirect: '/blacklist',
    name: '风控系统',
    meta: { title: '风控系统', icon: 'el-icon-s-tools', disabled: false, control: true },
    children: [
      {
        path: '/blacklist',
        name: '黑名单列表',
        component: () => import('@/views/riskManage/blacklist'),
        meta: { title: '黑名单列表', icon: 'el-icon-postcard', disabled: false, control: true }
      },
      {
        path: '/brushMonitoring',
        name: '刷子监控',
        component: () => import('@/views/riskManage/brushMonitoring'),
        meta: { title: '刷子监控', icon: 'el-icon-postcard', disabled: false, control: true }
      },
    ]
  },
  {
    path: '/userManage',
    component: Layout,
    redirect: '/account',
    name: '玩家管理',
    meta: { title: '玩家管理', icon: 'el-icon-s-custom', disabled: false, control: true },
    children: [
      {
        path: '/account',
        name: '玩家信息',
        component: () => import('@/views/userManage/user/account'),
        meta: { title: '玩家信息', icon: 'el-icon-postcard', disabled: false, control: true }
      },
      {
        path: '/dailyGame',
        name: '游戏每日数据',
        component: () => import('@/views/userManage/user/dailyGame'),
        meta: { title: '游戏每日数据', icon: 'el-icon-headset', disabled: false, control: true }
      },
      {
        path: '/mail',
        name: '邮件公告',
        component: () => import('@/views/userManage/mail/mail'),
        meta: { title: '邮件公告', icon: 'el-icon-s-comment', disabled: false, control: true }
      },
      {
        path: '/multilingual',
        name: '多语言配置',
        component: () => import('@/views/userManage/multilingual/multilingual'),
        meta: { title: '多语言配置', icon: 'el-icon-chat-line-round', disabled: false, control: true }
      },
      {
        path: '/userRecord',
        name: '玩家数据记录',
        component: ParentView,
        meta: { title: '玩家数据记录', icon: 'el-icon-c-scale-to-original', disabled: false, control: true },
        children: [
          {
            path: '/wander',
            name: '卢比流转记录',
            component: () => import('@/views/userManage/record/wander'),
            meta: { title: '卢比流转记录', icon: 'el-icon-postcard', disabled: false, control: true }
          },
          {
            path: '/game',
            name: '玩家游戏记录',
            component: () => import('@/views/userManage/record/game'),
            meta: { title: '玩家游戏记录', icon: 'el-icon-postcard', disabled: false, control: true }
          },
          {
            path: '/register',
            name: '玩家登录记录',
            component: () => import('@/views/userManage/record/register'),
            meta: { title: '玩家登录记录', icon: 'el-icon-postcard', disabled: false, control: true }
          },
          {
            path: '/activity',
            name: '玩家活动领取记录',
            component: () => import('@/views/userManage/record/activity'),
            meta: { title: '玩家活动领取记录', icon: 'el-icon-wallet', disabled: false, control: true }
          },
        ]
      },
      {
        path: '/resource',
        name: '资源管理',
        component: ParentView,
        meta: { title: '资源管理', icon: 'el-icon-c-scale-to-original', disabled: false, control: true },
        children: [
          {
            path: '/audit',
            name: '资源审核',
            component: () => import('@/views/userManage/resource/audit'),
            meta: { title: '资源审核', icon: 'el-icon-shopping-bag-1', disabled: false, control: true }
          },
          {
            path: '/history',
            name: '历史审核',
            component: () => import('@/views/userManage/resource/history'),
            meta: { title: '历史审核', icon: 'el-icon-present', disabled: false, control: true }
          },
          {
            path: '/application',
            name: '我的申请',
            component: () => import('@/views/userManage/resource/application'),
            meta: { title: '我的申请', icon: 'el-icon-present', disabled: false, control: true }
          },
          {
            path: '/apply',
            name: '资源申请',
            component: () => import('@/views/userManage/resource/apply'),
            meta: { title: '资源申请', icon: 'el-icon-shopping-bag-1', disabled: false, control: true }
          },
          {
            path: '/deduct',
            name: '资源扣除记录',
            component: () => import('@/views/userManage/resource/deduct'),
            meta: { title: '资源扣除记录', icon: 'el-icon-shopping-bag-1', disabled: false, control: true }
          }
        ]
      },
      {
        path: '/pinduoduoUser',
        name: '拼多多管理',
        component: () => import('@/views/userManage/pinduoduoUser/pinduoduoUser'),
        meta: { title: '拼多多管理', icon: 'el-icon-chat-line-round', disabled: false, control: true }
      },
    ]
  },
  {
    path: '/ordertManage',
    component: Layout,
    redirect: '/arraignment',
    name: '订单管理',
    meta: { title: '订单管理', icon: 'el-icon-s-tools', disabled: false, control: true },
    children: [
      {
        path: '/arraignment',
        name: '待提审提款订单',
        component: () => import('@/views/ordertManage/arraignment'),
        meta: { title: '待提审提款订单', icon: 'el-icon-s-grid', disabled: false, control: true }
      },
      {
        path: '/hauled',
        name: '已提审提款订单',
        component: () => import('@/views/ordertManage/hauled'),
        meta: { title: '已提审提款订单', icon: 'el-icon-s-grid', disabled: false, control: true }
      },
      {
        path: '/threeWay',
        name: '充值订单',
        component: () => import('@/views/ordertManage/threeWay'),
        meta: { title: '充值订单', icon: 'el-icon-s-grid', disabled: false, control: true }
      },
    ]
  },
  {
    path: '/kolManage',
    component: Layout,
    redirect: '/kolCheck',
    name: 'KOL管理',
    meta: { title: 'KOL管理', icon: 'el-icon-s-tools', disabled: false, control: true },
    children: [
      {
        path: '/kolCheck',
        name: 'KOL审核',
        component: () => import('@/views/kolManage/kolCheck/kolCheck'),
        meta: { title: 'KOL审核', icon: 'el-icon-postcard', disabled: false, control: true }
      },
      {
        path: '/kolApply',
        name: 'KOL申请',
        component: () => import('@/views/kolManage/kolApply/kolApply'),
        meta: { title: 'KOL申请', icon: 'el-icon-postcard', disabled: false, control: true }
      },
    ]
  },
  {
    path: '/activityManagement',
    component: Layout,
    redirect: '/onlineActivity',
    name: '活动管理',
    meta: { title: '活动管理', icon: 'el-icon-s-tools', disabled: false, control: true },
    children: [
      {
        path: '/onlineActivity',
        name: '上线活动',
        component: () => import('@/views/activityManage/onlineActivity'),
        meta: { title: '上线活动', icon: 'el-icon-s-grid', disabled: false, control: true }
      },
      {
        path: '/releaseActivity',
        name: '预发布活动',
        component: () => import('@/views/activityManage/releaseActivity'),
        meta: { title: '预发布活动', icon: 'el-icon-s-grid', disabled: false, control: true }
      },
      {
        path: '/closeActivity',
        name: '已下线活动',
        component: () => import('@/views/activityManage/closeActivity'),
        meta: { title: '已下线活动', icon: 'el-icon-s-grid', disabled: false, control: true }
      },
      {
        path: '/commodity',
        name: '商品管理',
        component: () => import('@/views/activityManage/commodity/commodity'),
        meta: { title: '商品管理', icon: 'el-icon-chat-line-round', disabled: false, control: true }
      },
      {
        path: '/firstBurst',
        name: '每日首爆',
        component: () => import('@/views/activityManage/firstBurst/firstBurst'),
        meta: { title: '每日首爆', icon: 'el-icon-chat-line-round', disabled: false, control: true }
      },
      {
        path: '/registration',
        name: '注册送金',
        component: () => import('@/views/activityManage/registration/registration'),
        meta: { title: '注册送金', icon: 'el-icon-chat-line-round', disabled: false, control: true }
      },
      {
        path: '/recharge',
        name: '首充',
        component: () => import('@/views/activityManage/recharge/recharge'),
        meta: { title: '首充', icon: 'el-icon-chat-line-round', disabled: false, control: true }
      },
      {
        path: '/pinduoduo',
        name: 'Free Cash',
        component: () => import('@/views/activityManage/pinduoduo/pinduoduo'),
        meta: { title: 'Free Cash', icon: 'el-icon-chat-line-round', disabled: false, control: true }
      },
      {
        path: '/pinduoduoWheel',
        name: '拼多多转盘',
        component: () => import('@/views/activityManage/pinduoduoWheel/pinduoduoWheel'),
        meta: { title: '拼多多转盘', icon: 'el-icon-chat-line-round', disabled: false, control: true }
      },
      {
        path: '/topUp',
        name: '充值活动',
        component: () => import('@/views/activityManage/topUp/topUp'),
        meta: { title: '充值活动', icon: 'el-icon-chat-line-round', disabled: false, control: true }
      },
      {
        path: '/binding',
        name: '绑定有礼',
        component: () => import('@/views/activityManage/binding/binding'),
        meta: { title: '绑定有礼', icon: 'el-icon-chat-line-round', disabled: false, control: true }
      },
      {
        path: '/download',
        name: '下载有礼',
        component: () => import('@/views/activityManage/download/download'),
        meta: { title: '下载有礼', icon: 'el-icon-chat-line-round', disabled: false, control: true }
      },
      {
        path: '/vipWeek',
        name: 'VIP周礼包',
        component: () => import('@/views/activityManage/vipWeek/vipWeek'),
        meta: { title: 'VIP周礼包', icon: 'el-icon-chat-line-round', disabled: false, control: true }
      },
      {
        path: '/sevenLogin',
        name: '七日登录',
        component: () => import('@/views/activityManage/sevenLogin/sevenLogin'),
        meta: { title: '七日登录', icon: 'el-icon-time', disabled: false, control: true }
      },
      {
      path: '/rouletteWheel',
        name: '充值轮盘',
        component: () => import('@/views/activityManage/rouletteWheel/rouletteWheel'),
        meta: { title: '充值轮盘', icon: 'el-icon-aim', disabled: false, control: true }
      },
      {
        path: '/monthCard',
        name: '月卡',
        component: () => import('@/views/activityManage/monthCard/monthCard'),
        meta: { title: '月卡', icon: 'el-icon-aim', disabled: false, control: true }
      },
      {
        path: '/proxyUpgrade',
        name: '代理升级',
        component: () => import('@/views/activityManage/proxyUpgrade/proxyUpgrade'),
        meta: { title: '代理升级', icon: 'el-icon-aim', disabled: false, control: true }
      },
    ]
  },
  {
    path: '/configManage',
    component: Layout,
    redirect: '/mailboxTemplate',
    name: '配置管理',
    meta: { title: '配置管理', icon: 'el-icon-setting', disabled: false, control: true },
    children: [
      {
        path: '/mailboxTemplate',
        name: '邮箱模版',
        component: () => import('@/views/configManage/mailboxTemplate/mailboxTemplate'),
        meta: { title: '邮箱模版', icon: 'el-icon-copy-document', disabled: false, control: true }
      },
      {
        path: '/mailbox',
        name: '邮箱配置',
        component: () => import('@/views/configManage/mailbox/mailbox'),
        meta: { title: '邮箱配置', icon: 'el-icon-copy-document', disabled: false, control: true }
      },
      {
        path: '/message',
        name: '短信配置',
        component: () => import('@/views/configManage/message/message'),
        meta: { title: '短信配置', icon: 'el-icon-copy-document', disabled: false, control: true }
      },
      {
        path: '/allocation',
        name: 'KOL配置',
        component: () => import('@/views/configManage/allocation/allocation'),
        meta: { title: 'KOL配置', icon: 'el-icon-copy-document', disabled: false, control: true }
      },
      {
        path: '/openInstall',
        name: 'openInstall配置',
        component: () => import('@/views/configManage/openInstall/openInstall'),
        meta: { title: 'openInstall配置', icon: 'el-icon-add-location', disabled: false, control: true }
      },
      {
        path: '/service',
        name: '客服地址配置',
        component: () => import('@/views/configManage/service/service'),
        meta: { title: '客服地址配置', icon: 'el-icon-phone-outline', disabled: false, control: true }
      },
      {
        path: '/package',
        name: '渠道包开关控制',
        component: () => import('@/views/configManage/package/package'),
        meta: { title: '渠道包开关控制', icon: 'el-icon-download', disabled: false, control: true }
      },
      {
        path: '/google',
        name: 'Google验证',
        component: () => import('@/views/configManage/google/google'),
        meta: { title: 'Google验证', icon: 'el-icon-add-location', disabled: false, control: true }
      },
    ]
  },
  {
    path: '/gameConfig',
    component: Layout,
    redirect: '/global',
    name: '游戏配置管理',
    meta: { title: '游戏配置管理', icon: 'el-icon-s-tools', disabled: false, control: true },
    children: [
      {
        path: '/refresh',
        name: '重载表',
        component: () => import('@/views/gameManage/refresh/refresh'),
        meta: { title: '重载表', icon: 'el-icon-refresh', disabled: false, control: true }
      },
      {
        path: '/global',
        name: '全局表',
        component: () => import('@/views/gameManage/global/global'),
        meta: { title: '全局表', icon: 'el-icon-s-grid', disabled: false, control: true }
      },
      {
        path: '/room',
        name: '房间表',
        component: () => import('@/views/gameManage/room/room'),
        meta: { title: '房间表', icon: 'el-icon-s-grid', disabled: false, control: true }
      },
      {
        path: '/robot',
        name: '机器人表',
        component: () => import('@/views/gameManage/robot/robot'),
        meta: { title: '机器人表', icon: 'el-icon-s-grid', disabled: false, control: true }
      },
      {
        path: '/running',
        name: '跑马灯与机器人',
        component: () => import('@/views/gameManage/running/running'),
        meta: { title: '跑马灯与机器人', icon: 'el-icon-crop', disabled: false, control: true }
      },
      {
        path: '/card',
        name: '基础牌',
        component: () => import('@/views/gameManage/card/card'),
        meta: { title: '基础牌', icon: 'el-icon-bank-card', disabled: false, control: true }
      },
      {
        path: '/deck',
        name: '牌组类型',
        component: () => import('@/views/gameManage/deck/deck'),
        meta: { title: '牌组类型', icon: 'el-icon-s-grid', disabled: false, control: true }
      },
      {
        path: '/preinstall',
        name: '预设表',
        component: () => import('@/views/gameManage/preinstall/preinstall'),
        meta: { title: '预设表', icon: 'el-icon-s-grid', disabled: false, control: true }
      },
      {
        path: '/prop',
        name: '道具表',
        component: () => import('@/views/gameManage/prop/prop'),
        meta: { title: '道具表', icon: 'el-icon-s-grid', disabled: false, control: true }
      },
      {
        path: '/gift',
        name: '礼物表',
        component: () => import('@/views/gameManage/gift/gift'),
        meta: { title: '礼物表', icon: 'el-icon-s-grid', disabled: false, control: true }
      },
      {
        path: '/chat',
        name: '快捷聊天表',
        component: () => import('@/views/gameManage/chat/chat'),
        meta: { title: '快捷聊天表', icon: 'el-icon-s-grid', disabled: false, control: true }
      },
      {
        path: '/dealer',
        name: '荷官聊天表',
        component: () => import('@/views/gameManage/dealer/dealer'),
        meta: { title: '荷官聊天表', icon: 'el-icon-s-grid', disabled: false, control: true }
      },
      {
        path: '/vip',
        name: 'VIP管理',
        component: ParentView,
        meta: { title: 'VIP管理', icon: 'el-icon-c-scale-to-original', disabled: false, control: true },
        children: [
          {
            path: '/vipConfig',
            name: 'VIP配置',
            component: () => import('@/views/gameManage/vip/vipConfig/vipConfig'),
            meta: { title: 'VIP配置', icon: 'el-icon-shopping-bag-1', disabled: false, control: true }
          },
          {
            path: '/vipGift',
            name: 'VIP礼包配置',
            component: () => import('@/views/gameManage/vip/vipGift/vipGift'),
            meta: { title: 'VIP礼包配置', icon: 'el-icon-present', disabled: false, control: true }
          },
          {
            path: '/vipRecord',
            name: 'VIP领取记录',
            component: () => import('@/views/gameManage/vip/vipRecord'),
            meta: { title: 'VIP领取记录', icon: 'el-icon-wallet', disabled: false, control: true }
          },
        ]
      },
      {
        path: '/thermal',
        name: '热更管理',
        component: () => import('@/views/gameManage/thermal/thermal'),
        meta: { title: '热更管理', icon: 'el-icon-copy-document', disabled: false, control: true }
      },
      {
        path: '/proxy',
        name: '代理升降级',
        component: () => import('@/views/gameManage/proxy/proxy'),
        meta: { title: '代理升降级', icon: 'el-icon-copy-document', disabled: false, control: true }
      },
      {
        path: '/rebate',
        name: '代理返佣',
        component: () => import('@/views/gameManage/rebate/rebate'),
        meta: { title: '代理返佣', icon: 'el-icon-copy-document', disabled: false, control: true }
      }
      
    ]
  },
  {
    path: '/systemManage',
    component: Layout,
    redirect: '/menus',
    name: '系统管理',
    meta: { title: '系统管理', icon: 'el-icon-s-tools', disabled: false, control: true },
    children: [
      {
        path: '/menus',
        name: '菜单管理',
        component: () => import('@/views/sysManage/menu/menus'),
        meta: { title: '菜单管理', icon: 'el-icon-s-operation', disabled: false, control: true }
      },
      {
        path: '/api',
        name: '按钮管理',
        component: () => import('@/views/sysManage/api/api'),
        meta: { title: '按钮管理', icon: 'el-icon-s-data', disabled: false, control: true }
      },
      {
        path: '/role',
        name: '角色管理',
        component: () => import('@/views/sysManage/role/role'),
        meta: { title: '角色管理', icon: 'el-icon-s-custom', disabled: false, control: true }
      },
      {
        path: '/user',
        name: '用户管理',
        component: () => import('@/views/sysManage/user/user'),
        meta: { title: '用户管理', icon: 'el-icon-user', disabled: false, control: true }
      },
      {
        path: '/record',
        name: '操作记录',
        component: () => import('@/views/sysManage/record/record'),
        meta: { title: '操作记录', icon: 'el-icon-s-order', disabled: false, control: true }
      },
      {
        path: '/whitelist',
        component: () => import('@/views/sysManage/whitelist/whitelist'),
        name: '白名单',
        meta: { title: '白名单', icon: 'el-icon-tickets', disabled: false, control: true }
      },
      {
        path: '/facebook',
        component: () => import('@/views/sysManage/facebook/facebook'),
        name: 'FB设置',
        meta: { title: 'FB设置', icon: 'el-icon-collection-tag', disabled: false, control: true }
      },
    ]
  },
  {
    path: '/manageGame',
    component: Layout,
    redirect: '/gameManagement',
    name: '游戏管理',
    meta: { title: '游戏管理', icon: 'el-icon-cpu', disabled: false, control: true },
    children: [{
      path: '/gameManagement',
      name: '游戏设置',
      component: () => import('@/views/webGame/gameManage/game'),
      meta: { title: '游戏设置', icon: 'el-icon-connection', disabled: false, control: true }
    },{
      path: '/bannerManagement',
      name: 'banner设置',
      component: () => import('@/views/webGame/bannerManage/banner'),
      meta: { title: 'banner设置', icon: 'el-icon-connection', disabled: false, control: true }
    },{
      path: '/navigationManagement',
      name: 'web导航栏设置',
      component: () => import('@/views/webGame/navigationManage/navigation'),
      meta: { title: 'web导航栏设置', icon: 'el-icon-connection', disabled: false, control: true }
    }]
  },
  {
    path: '/404',
    component: () => import('@/views/404'),
    hidden: true,
    meta: {
      disabled: false
    }
  },
  {
    path: '/redirect',
    component: Layout,
    hidden: true,
    meta: {
      disabled: false
    },
    children: [
      {
        path: '/redirect/:path(.*)',
        meta: { disabled: false},
        component: () => import('@/components/redirect/index')
      }
    ]
  }
]

// 动态路由
export const asyncRoutes = []

// 错误路由
export const errorRoutes = [
  { path: '*', redirect: '/404', hidden: true, meta: { disabled: false } }
]

const createRouter = () => new Router({
  // mode: 'history', // require service support
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRoutes.concat(errorRoutes)
})

const router = createRouter()

export function resetRouter() {
  const newRouter = createRouter()
  router.matcher = newRouter.matcher // reset router
}
export default router
